package com.example.csdn.DTO;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

@Data
public class LoginDTO {
    @NotEmpty(message = "请输入用户名")
    @Pattern(regexp = "^\\S{3,10}$",message = "用户名长度不合法")
    private String username;

    @NotEmpty(message = "请输入密码")
    @Pattern(regexp = "^\\S{6,18}$",message = "密码长度不合法")
    private String password;
}
